/*
 * date: 2009-11-20 
 * author: Maciej Smolenski <jezdnia@gmail.com>
 */
#include "common.hpp"
#include <arpa/inet.h>
#include <algorithm>
#include <iostream>
#include <ostream>
#include <iterator>
#include <string>


int fill(std::set<rc::rpc_host_entry_string> &set, int num)
{
	rc::rpc_host_entry_string r1(std::string("host1"), 1111, IPPROTO_TCP);
	rc::rpc_host_entry_string r2(std::string("host2"), 2222, IPPROTO_UDP);
	rc::rpc_host_entry_string r3(std::string("host3"), 3333, IPPROTO_UDP);
	for(int i=0;i<num;i++)
	{
	set.insert(r1);
	set.insert(r2);
	set.insert(r3);
	r1.port++;
	r2.port++;
	r3.port++;
	}
	return 0;
}

int fill(std::set<rm::rpc_service_string> &set, int num)
{
	rm::rpc_service_string r1(std::string("host1"), 1111, 1, num, IPPROTO_TCP, state_on);
	rm::rpc_service_string r2(std::string("host2"), 2222, 2, num+1, IPPROTO_UDP, state_off);
	rm::rpc_service_string r3(std::string("host3"), 3333, 3, num+2, IPPROTO_TCP, state_on);
	for(int i=0;i<num;i++)
	{
	set.insert(r1);
	set.insert(r2);
	set.insert(r3);
	r1.port++;
	r2.port++;
	r3.port++;
	}
	return 0;
}
 
